package com.qire.manhua.activity;

import android.os.Bundle;

import com.qire.antscore.annotation.RouteMapping;
import com.qire.antsrouter.inject.Autowired;
import com.qire.common.constant.Navigation;
import com.qire.common.inject.EventControllerInjector;
import com.qire.common.inject.ViewModelInjector;
import com.qire.common.support.base.BaseActivity;
import com.qire.common.utils.ThemeUtil;
import com.qire.manhua.R;
import com.qire.manhua.controller.MessageLikeListController;
import com.qire.manhua.databinding.ActivityMessageLikeListBinding;
import com.qire.manhua.model.viewModel.impl.MessageLikeListViewModel;

import androidx.annotation.Nullable;

/**
 * 消息->点赞列表页
 */
@RouteMapping(path = Navigation.Page.MessageLikeListPage)
public class MessageLikeListActivity extends BaseActivity<ActivityMessageLikeListBinding> {

    @Autowired(injector = ViewModelInjector.class)
    MessageLikeListViewModel viewModel;

    @Autowired(injector = EventControllerInjector.class)
    MessageLikeListController controller;

    @Override
    public int layoutRid() {
        return R.layout.activity_message_like_list;
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ThemeUtil.changeStatusBarLightOrDark(this, true, true);

        viewModel.onAddition(controller);
        controller.onAddition(viewModel);

        viewModel.loadData();
        viewModel.markAllRead();

    }
}
